home *** CD-ROM | disk | FTP | other *** search
- Path: newsserver.rrzn.uni-hannover.de!tubsibr!duening
- From: duening@ibr.cs.tu-bs.de (Lars Duening)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: PPC compilers
- Date: 8 Jan 1996 23:12:14 GMT
- Organization: TU Braunschweig, Informatik (Bueltenweg), Germany
- Distribution: world
- Message-ID: <4cs8ce$ljg@ra.ibr.cs.tu-bs.de>
- References: <john.hendrikx.40ka@grafix.xs4all.nl> <4b77tq$htp@serpens.rhein.de> <MQAQx*XOe@yaps.rhein.de> <4bqhnf$6g5@sunsystem5.informatik.tu-muenchen.de> <jasonb.820051107@cs.uwa.edu.au> <4c9i2l$h3i@sunsystem5.informatik.tu-muenchen.de> <4cf0ep$233@ra.i <4ck37m$g07@maureen.teleport.com>
- Reply-To: duening@ibr.cs.tu-bs.de (Lars Duening)
- NNTP-Posting-Host: kastor.ibr.cs.tu-bs.de
-
- In article <4ck37m$g07@maureen.teleport.com> sschaem@teleport.com (Stephan Schaem) writes:
- >Organization: Teleport - Portland's Public Access (503) 220-1016
- >Distribution: world
- >
- >Jim Cooper (jamie@jamie.interpath.net) wrote:
- >: In article <4cgo3i$b8n@sunsystem5.informatik.tu-muenchen.de> fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) writes:
- >: > Lars Duening (duening@ibr.cs.tu-bs.de) wrote:
- >: > : That doesn't count because in C you don't need to know if this statement
- >: > : compiles to a .w, to a .l or even to a .q .
- >: >
- >: > but when the .l meets a real-world color-register, you will notice
- >: > your claim is not always true.
- >
- >: Why do you insist on making this seem harder than it needs to be?
- >
- >: The answer is quite simple and straightforward:
- >
- >: In ASM, *you*, the programmer, must remember to add the '.w' by hand every
- >: time you reference the "real-world color-register," otherwise, possible
- >: fireworks.
- >
- >: In C, the structure is defined *once*, in a system header file, in fact, and
- >: the programmer never needs to know if the compiler will generate '.w', '.l',
- >: or anything else.
- >
- > Just a reminder... in C or ASM you need to know what a color register
- > is if you want to operate on it, unless you call high level function
- > to do the job for you (Even them you need to look in the .h or doc
- > what type is needed as parameter).
-
- I need to know if it's a scalar type (further subdivided into integer
- and floating types), an array, a structure, a pointer or else, but I
- do not need to know it's exakt size in byte when using it.
-
- Sometimes I don't even need to know the exact type 'cause the compiler
- will create conversion code plus overflow checking (I'm not talking
- just C here).
-
- In optimum cases, the values of the chipregs have been assigned own
- types, so I can just write 'blt0con_t *b;' or less specific 'int32
- *b;'. Again I don't need to know the size of the type, just which of
- the scalar integer types it is.
-
- > Otherwise you need to know that color0 is a word holding 12bit
- > of valid data grouped in 4bit nibles,
-
- typedef struct {
- int r : 4;
- int g : 4;
- int b : 4;
- } color0_t;
-
- color0_t color0;
- --
- Lars Duening; duening@ibr.cs.tu-bs.de
-